package com.jgk.gwt.recipes.util

class GwtArchetype {
	
	def doArchetype() {
		println "doing archetype"
		def groupId="com.jgk.gwt.recipes"
		def artifactId="jgk-gwt-recipes-first"
		def version="1.0-SNAPSHOT"
		def packageName="com.jgk.gwt.recipes"
		def module="JgkGwtRecipesFirsty"
		def cmd=
		[
			"/Users/jkroub/software/jakarta/maven/apache-maven-3.0/bin/mvn", 
			"archetype:generate",
			"-DarchetypeRepository=repo1.maven.org",
			"-DarchetypeGroupId=org.codehaus.mojo",
			"-DarchetypeArtifactId=gwt-maven-plugin", 
			"-DarchetypeVersion=2.3.0",
			"-artifactId=${artifactId}",
			"-DgroupId=${groupId}",
			"-Dpackage=${packageName}",
			"-Dmodule=${module}",
			"-Dversion=${version}}"
			]
   		
		println cmd.join(' ')
		cmd.execute()
	}
	static main(args) {
		println "doing it"
		new GwtArchetype().doArchetype()
	}
}
